'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')

let conf = {
  NODE_ENV: 'development',
  // SERVER_HOST: '192.168.3.50', // 服务器IP或域名
  // SERVER_HOST: '192.168.3.80', // 服务器IP或域名
  // SERVER_HOST: '11.153.233.16', // 服务器IP或域名
  
  SERVER_HOST: 'localhost',
  // SERVER_HOST: '192.168.31.36',
  // SERVER_HOST: '192.168.31.150',
  SERVER_PORT: '8081', // 服务器端口号 80端口也要写
  SERVER_SCHEMA: 'http', // 请求协议
  // TOKEN: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJXeFVzZXJJZCI6IjE5NGMxOGI4LTI2OGQtNGMyOC05ZWMwLTZlYzFmYjBlOTU0MCIsIm9wZW5pZCI6Im9pYlNZd0ZXMWJReHRIUHI3MjJKclkwTlBRRkkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoi5YGl5YGlIiwibmJmIjoxNTYxMTI2NDM2LCJleHAiOjE1NjEyMzQ0MzYsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODg4OC8iLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0Ojg4ODgvIn0.rS4DZ9pm6nrmZdGpHX-teG48Q1KP8VszP8PQ140IlBU'
  TOKEN: null,
};

conf.SERVER_HTTP = `${conf.SERVER_SCHEMA}://` +
  `${conf.SERVER_HOST}${conf.SERVER_PORT == '80' ? '' : ':' + conf.SERVER_PORT}` +
  `/`;

  conf.SERVER_HTTP = `${conf.SERVER_SCHEMA}://frp.51zhebao.com` +
  `${conf.SERVER_PORT == '80' ? '' : ':' + conf.SERVER_PORT}` +
  `/`;

for (let key in conf) {
  conf[key] = JSON.stringify(conf[key]);
}

module.exports = merge(prodEnv, conf);
